package components

import (
	"github.com/go-fuego/fuego/examples/full-app-gourmet/store/types"
)

templ CategorySelector(selectedCategory types.Category) {
	<select
		id="category"
		name="category"
		class="input"
		style="min-width: 5rem;"
	>
		for _, category := range types.CategoryValues {
			<option
				value={ string(category) }
				if category == selectedCategory {
					selected
				}
			>
				{ types.CategoriesTranslations[category][types.LocaleEmoji] +" "+ types.CategoriesTranslations[category][types.LocaleEn] }
			</option>
		}
	</select>
}
